
package com.hy.erp.inventory.pojo;

import java.io.Serializable;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import org.hibernate.annotations.Index;

import com.hy.erp.inventory.pojo.BillType;
import com.hy.erp.inventory.pojo.CargoSpace;
import com.hy.erp.inventory.pojo.Materiel;
import com.hy.erp.inventory.pojo.Organisation;
import com.hy.erp.inventory.pojo.QualityControlManner;
import com.hy.erp.inventory.pojo.Units;
import com.hy.erp.inventory.pojo.Depot;
/**
 * 
 * <ul>
 * <li>开发作者：李冰</li>
 * <li>设计日期：2010-10-6；时间：上午10:28:20</li>
 * <li>类型名称：Caigoushenqing</li>
 * <li>设计目的：采购计划</li>
 * </ul>
 * <ul>
 * <b>修订编号：</b>
 * <li>修订日期：</li>
 * <li>修订作者：</li>
 * <li>修订原因：</li>
 * <li>修订内容：</li>
 * </ul>
 */
//@ Entity 
//@Table(name="t_caigounotice") 
public class Caigoushenqing  implements  Serializable
{                                       
  

/**
	 * <ul>
	 * <li>开发作者：李冰</li>
	 * <li>设计日期：2010-9-19；时间：下午12:05:33</li>
	 * <li>字段类型：long；字段名称：serialVersionUID</li>
	 * <li>设计目的：</li>
	 * </ul>
	 * <ul>
	 * <b>修订编号：</b>
	 * <li>修订日期：</li>
	 * <li>修订作者：</li>
	 * <li>修订原因：</li>
	 * <li>修订内容：</li>
	 * </ul>
	 */
	private static final long	serialVersionUID	=
														5539243553997965683L ;
	private List < Materiel >	materiel ;
private String CaigoushenqingId;
private BillType billType;
private CargoSpace cargoSpace;
private Depot depot;
private Organisation organisation;
private Units units;
private QualityControlManner qualityControlManner;

  
public Caigoushenqing (
					 )
{

}
@Id
@ Column ( name = "caigoushenqingId" , length = 50 )
@ Index ( name = "caigoushenqingIdIndex" )

public String getCaigoushenqingId() {
	return CaigoushenqingId;
}
public void setCaigoushenqingId(String caigoushenqingId) {
	CaigoushenqingId = caigoushenqingId;
}
@ ManyToOne ( targetEntity = BillType.class , fetch = FetchType.LAZY )

public BillType getBillType() {
	return billType;
}
public void setBillType(BillType billType) {
	this.billType = billType;
}
@ ManyToOne ( targetEntity = CargoSpace.class , fetch = FetchType.LAZY  )
@JoinColumn(name = "CargoSpaceID")   
public CargoSpace getCargoSpace() {
	return cargoSpace;
}
public void setCargoSpace(CargoSpace cargoSpace) {
	this.cargoSpace = cargoSpace;
}
@ ManyToOne ( targetEntity = Depot.class , fetch = FetchType.LAZY )
@JoinColumn(name = "depotID") 
public Depot getDepot() {
	return depot;
}
public void setDepot(Depot depot) {
	this.depot = depot;
}
@ OneToOne ( targetEntity = Organisation.class , fetch = FetchType.LAZY )
@JoinColumn(name = "OrganisationID") 
public Organisation getOrganisation() {
	return organisation;
}
public void setOrganisation(Organisation organisation) {
	this.organisation = organisation;
}
public QualityControlManner getQualityControlManner() {
	return qualityControlManner;
}
public void setQualityControlManner(QualityControlManner qualityControlManner) {
	this.qualityControlManner = qualityControlManner;
}
public Caigoushenqing(String caigoushenqingId, BillType billType,
		CargoSpace cargoSpace, com.hy.erp.inventory.pojo.Depot depot, Organisation organisation,
		Units units, QualityControlManner qualityControlManner) {
	super();
	CaigoushenqingId = caigoushenqingId;
	this.billType = billType;
	this.cargoSpace = cargoSpace;
	this.depot = depot;
	this.organisation = organisation;
	this.units = units;
	this.qualityControlManner = qualityControlManner;
}
@ OneToMany ( targetEntity = Materiel.class , fetch = FetchType.LAZY )
@JoinColumn(name = "materielID") 
public List<Materiel> getMateriel() {
	return materiel;
}
public void setMateriel(List<Materiel> materiel) {
	this.materiel = materiel;
}

}
